Hello, |
Re: Problem with countscript
Hi,
Module m = current
Object o
int ok = 0, cancel = 0, open=0
string sOrder
for o in m do {
sOrder = probeAttr_(o, "Order")
if(sOrder=="ok")ok++
else if(sOrder=="cancel")cancel++
else if(sOrder=="open")open++
}
|
Re: Problem with countscript adevicq - Thu Aug 26 05:27:34 EDT 2010
Hi,
Module m = current
Object o
int ok = 0, cancel = 0, open=0
string sOrder
for o in m do {
sOrder = probeAttr_(o, "Order")
if(sOrder=="ok")ok++
else if(sOrder=="cancel")cancel++
else if(sOrder=="open")open++
}
If i run this code Follow Doors Window appears "DXL Execuiton Timeout: Youmay:" with Buttons: Halt execution / Continue / Continue, double existing timeout if i press three times "continue" in DXL output appear the right solutions |
Re: Problem with countscript SystemAdmin - Thu Aug 26 07:32:50 EDT 2010
That is a safety feature that allows you to halt programs that run forever. You can disable it, or better set the timeout to a higher value using: pragma runLim, 1000000 // set this to 0 to disable the timeout
Mathias Mamsch, IT-QBase GmbH, Consultant for Requirement Engineering and D00RS
|
Re: Problem with countscript SystemAdmin - Thu Aug 26 07:32:50 EDT 2010 Just add to the first line off script: pragma runLim, 0
|
Re: Problem with countscript mgomes - Thu Aug 26 07:48:35 EDT 2010 Just add to the first line off script: pragma runLim, 0
Attribute Order and the Condition "is equal to" can be realise with == But how is it possible to realise "is empty" ? My idea is to look about length=0 but i dont know how to wirte this in a dxl code. Anyone has an idea? Thanks |
Re: Problem with countscript SystemAdmin - Thu Aug 26 10:26:00 EDT 2010
The simple option is to compare with the empty string:
...
int nEmpty = 0
...
if (sOrder == ""){nEmpty++}
...
|